package cz.cvut.manatee.client;

import com.google.gwt.user.client.ui.RadioButton;

public class RadioButtonExtended extends RadioButton {
	static int counter = 0;
	
	/**
	 * Prida ke skupine cislo a tim vytvori unikatni skupinu radioboxu
	 * 
	 * @param name the name
	 * @param label the label
	 * @param countName zda ma pridat ke skupine cislo
	 * @param nextCounter zda ke skupine pridat nove (dalsi) cislo
	 */
	public RadioButtonExtended(String name, String label, boolean countName, boolean nextCounter) {
		super( (countName ? (nextCounter ? name + (++counter) : name + counter) : name), label);
	}
	
	public RadioButtonExtended(String name, String label) {
		super(name, label);
	}
	
	public RadioButtonExtended(String name) {
		super(name);
	}
}
